package com.zhenmaitang.clinic_sys.entity;

import io.swagger.v3.oas.annotations.media.Schema;

/**
 * 用户角色关联实体类 - 用户与角色的关联关系
 */
@Schema(description = "用户角色关联实体", example = "用户角色关联信息")
public class UserRole {
    @Schema(description = "用户ID", example = "1", requiredMode = Schema.RequiredMode.REQUIRED)
    private Integer userId;
    
    @Schema(description = "角色ID", example = "1", requiredMode = Schema.RequiredMode.REQUIRED)
    private Integer roleId;
    
    @Schema(description = "部门ID", example = "1")
    private Integer departmentId;

    // 构造函数
    public UserRole() {}

    public UserRole(Integer userId, Integer roleId, Integer departmentId) {
        this.userId = userId;
        this.roleId = roleId;
        this.departmentId = departmentId;
    }

    // Getter和Setter方法
    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getRoleId() {
        return roleId;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }

    public Integer getDepartmentId() {
        return departmentId;
    }

    public void setDepartmentId(Integer departmentId) {
        this.departmentId = departmentId;
    }

    @Override
    public String toString() {
        return "UserRole{" +
                "userId=" + userId +
                ", roleId=" + roleId +
                ", departmentId=" + departmentId +
                '}';
    }
}